package com.qf.controller;


import com.qf.pojo.Order;
import com.qf.utils.AlipayTools;
import com.qf.utils.ResultMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class PayController {

    @Autowired
    AlipayTools alipayTools;

    @PostMapping("/pay")
    public ResultMsg pay(@RequestBody Order order){
        String alipay = alipayTools.alipay(order);
        return ResultMsg.SUCCESS(alipay);
    }
}
